Release 10.1A: OpenEdge Development:
Progress 4GL Reference
SAVE( ) method
Saves or sends an XML document.
Return type: LOGICAL Applies to: X-document object handle
modeA character expression that evaluates to one of the following: “FILE”, “STREAM”, “MEMPTR”, or “LONGCHAR”. The
modeindicates whether the XML target is a file, a stream, a MEMPTR, or a LONGCHAR variable.fileA character expression that represents the name of a new file to be created in current working directory of the underlying operating system’s file system. If a file with the specified name already exists, Progress verifies that the file is writeable and overwrites the file.
streamA character expression that represents the name of a 4GL stream. If
streamis "", Progress saves the document to the 4GL session unnamed stream.memptrA MEMPTR variable to contain the saved XML text in memory. The SAVE method allocates the required amount of memory and sets the size of the variable. You must release the memory later with a SET-SIZE( ) = 0.
longcharA LONGCHAR variable to contain the saved XML text in memory.
Progress saves the LONGCHAR variable in the code page of the XML document, as determined by the XML document’s ENCODING attribute. If the XML document’s ENCODING attribute has not been set, the LONGCHAR variable is saved in UTF-8.
If the LONGCHAR variable’s code page is fixed (that is, set using the FIX-CODEPAGE function) and the fixed code page is not equivalent to the encoding specified in the XML document’s ENCODING attribute, the SAVE( ) method returns an error and the XML document is not saved to the LONGCHAR.
ExampleThe following code fragments demonstrate the use of the SAVE( ) method:
See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |